from django.urls import path, include
from rest_framework_nested import routers

from . import views

router = routers.DefaultRouter()
router.register("categories", views.CategoryViewSet)

categories_router = routers.NestedDefaultRouter(router, "categories", lookup="category")
categories_router.register(
    "images", views.CategoryImageViewSet, basename="category-images"
)
categories_router.register(
    "json-files", views.CategoryJsonViewSet, basename="category-json-files"
)

urlpatterns = [
    path("", include(router.urls)),
    path("", include(categories_router.urls)),
    path("login/service/", views.get_server_status),
]
